<#include "include/macro-head.ftl">
<#include "include/macro-script.ftl">
<!doctype html>
<html lang="en">
<head>
<@head></@head>
    <title>作品展示</title>
</head>
<body>
<#include "include/main-nav.ftl">
<div class="work">
    <div class="container">
        <div class="row">
            <div class="col-md-10">
                <div class="work-top">
                    <h4 class="work-top-title pull-left"><span class="glyphicon glyphicon-list">&nbsp;</span>发现</h4>
                    <ul>
                        <form class="search">
                            <div class="form-group">
                                <form method="get" action="${server}/work/show">
                                    <input type="text" name="key" class="form-control" id="key" placeholder="搜搜作品或话题">
                                    <span class="search-ico glyphicon glyphicon-search search-work"></span>
                                </form>
                            </div>
                        </form>
                        <li <#if show_active?? && show_active == "new" >class="active"</#if>>
                            <a href="${server}/work/show">最新</a>
                        </li>
                        <li <#if show_active?? && show_active == "over" >class="active"</#if>>
                            <a href="${server}/work/show?orderby=over">人气</a>
                        </li>
                        <li <#if show_active?? && show_active == "recommend" >class="active"</#if>>
                            <a href="${server}/work/show?orderby=recommend">推荐</a>
                        </li>
                        <li <#if show_active?? && show_active == "collection" >class="active"</#if>>
                            <a href="${server}/work/show?orderby=collection">收藏</a>
                        </li>
                        <li><a href="javascript:;" id="department">部门</a></li>
                        <li><a href="javascript:;" id="year">年份</a></li>
                    </ul>
                </div>
                <div class="work-top-list">
                    <ul id="work-top-list">
                    <#list hotTagList as tag>
                        <#if tag_index < 10>
                            <li><a href="${server}/tag/${tag.tagName}">${tag.tagName}</a></li>
                        </#if>
                    </#list>
                    </ul>
                </div>
            <#include "include/work-main.ftl">

                <div class="work-page" style="margin-right: 20px">
                    <ul class="pagination pull-right">
                    <#if (page.sumPage<=4)&&(page.sumPage>0)>
                        <#list 1..page.sumPage  as p>
                            <#if p == page.curPage>
                                <li class="active"><a href="${server}/work/show/${p}${page.condition}">${p}</a></li>
                            <#else>
                                <li><a href="${server}/work/show/${p}${page.condition}">${p}</a></li>
                            </#if>
                        </#list>
                    <#elseif (page.sumPage > 4)>
                        <#if page.curPage != 1>
                            <li><a href="#">&gt;</a></li>
                        </#if>
                        <#if page.curPage + 3 <= page.sumPage >
                            <#list page.curPage..page.sumPage as p>
                                <#if p == page.curPage>
                                    <li class="active"><a href="${server}/work/show/${p}${page.condition}">${p}</a></li>
                                <#else>
                                    <li><a href="${server}/work/show/${p}${page.condition}">p</a></li>
                                </#if>
                            </#list>
                        <#else>
                            <#list page.curPage..page.curPage+3 as p>
                                <#if p == page.curPage>
                                    <li class="active"><a href="${server}/work/show/${p}${page.condition}">${p}</a></li>
                                <#else>
                                    <li><a href="${server}/work/show/${p}${page.condition}">p</a></li>
                                </#if>
                            </#list>
                            <li><a href="${server}/work/show/${page.curPage+4}${page.condition}">&gt;&gt;</a></li>
                        </#if>
                    </#if>
                    </ul>
                </div>
            </div>

        <#include "include/work-hot.ftl">
        </div>
    </div>
</div>
<#include "include/main-footer.ftl">
</body>
<@script></@script>
</html>